﻿package com.demo.action;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**  
 *   @SpringBootApplication 来标注一个主程序类，说明这是一个Spring Boot应用  
 */
@Controller
@SpringBootApplication
public class Application {
    private final Logger logger = LoggerFactory.getLogger(Application.class);
    @ResponseBody
    @RequestMapping("/hello")
    public String hello(){
          return "Hello World!";
    }

    public static void main(String[] args){
        // Spring应用启动起来         
        SpringApplication.run(Application.class,args);
    }
}
